package com.jrx.anytxn.reporting.job.xib.step;

import com.jrx.anytxn.customer.entity.CmCustomerFirstLevel;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisCursorItemReader;

import java.util.HashMap;
import java.util.Map;

/**
 * @comment: 零售客户信息数据报表Reader
 * @author: hsoong
 * @date: 2021/7/1 09:51
 */
public class CustInfoReportingReader extends MyBatisCursorItemReader<CmCustomerFirstLevel> {

    public CustInfoReportingReader(SqlSessionFactory sqlSessionFactory, String limitTime){
        setSqlSessionFactory(sqlSessionFactory);
        setSaveState(false);
        setQueryId("com.jrx.anytxn.customer.mapper.ext.ExtCmCustomerFirstLevelMapper.selectByCreateTimeGreaterThanEquals");

        Map<String,Object> map = new HashMap<>();
        map.put("limitTime", limitTime);
        setParameterValues(map);
    }

}
